import axios from 'axios';

export function requestCn(config) {
  const service = axios.create({
    baseURL: 'http://152.136.185.210:8000/',
    timeout: 50000
  });

  service.interceptors.request.use(
    config => {
      config.headers.Authorization = 'dsdsdsdsddsddsfefwefefewf'
      return config
    },
    err => {
      return Promise.reject(err)
    }
  );


  service.interceptors.response.use(
    response => {
      return response.data
    },
    err => {
      return Promise.reject(err);
    }
  );

  return service(config)

}
